<template name="topOpenBar">
	<view class="topBanner">
		<image src="../../static/120.png"></image>
		<text>拼好课，轻松赚</text>
		<a id="toApp" href="javascript:;" :data-url="url" onclick="toApp()" :data-id="id" :data-uid="uid">打开APP</a>
	</view>
</template>

<script>
	import {
		mapState,
		mapGetters,
		mapMutation,
		mapActions
	} from "vuex";
	export default {
		name: 'topOpenBar', //组件名称
		// 传递参数
		props: {
			url: {
				type: String,
				default: ''
			},
			id: {
				type: Number,
				default: 0
			},
			uid:{
				type: Number,
				default: 0
			}
		},
		// 组件参数
		data() {
			return {

			}
		},
		// 组件方法
		methods: {

		}

	}
</script>

<style lang="less" scoped>
	.topBanner {
		position: fixed;
		top: 0;
		left: 0;
		height: 90upx;
		width: 100%;
		display: flex;
		background-color: rgba(0, 0, 0, .7);
		padding: 0 20upx;
		align-items: center;
		color: #fff;
		z-index: 99999;

		image {
			width: 35px;
			height: 35px;
		}

		text {
			font-size: 32upx;
			flex-grow: 1;
			padding: 0 20upx;
		}

		a {
			display: block;
			text-decoration: none;
			height: 60upx;
			line-height: 60upx;
			background-color: #fbc521;
			font-size: 28upx;
			padding: 0 20upx;
			border-radius: 10upx;
			color: #000;
		}
	}
</style>
